﻿using System;
using System.Collections.Generic;
using BusinessLogic.Models.ValidationAttributes;
using Interfaces.Models;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace BusinessLogic.Models.LogicModels.News
{
    public class Feed : IFeed
    {
        [NotNullValidator(Tag = RulesKeys.Required)]
        public Guid Id { get; set; }
        public string BaseUri { get; set; }
        public string Copyright { get; set; }
        public DateTime LastUpdatedTime { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string ImageUrl { get; set; }
        public string Language { get; set; }

        [ObjectCollectionValidator(typeof(IPerson))]
        public ICollection<IPerson> Persons { get; set; }

        [ObjectCollectionValidator(typeof(ICategory))]
        public ICollection<ICategory> Categories { get; set; }

        [ObjectCollectionValidator(typeof(ILink))]
        public ICollection<ILink> Links { get; set; }

        [ObjectCollectionValidator(typeof(INewsDataItem))]
        public ICollection<INewsDataItem> Items { get; set; }
    }
}
